import fetch from "./request.js";

// 新闻分类
export function pageNewsInfo(data) {
  return fetch("/nb-pc/1.0.1/NewsInfoService/pageNewsInfo", {
    method: "post",
    data: data,
  });
}
// 查询
export function listNewsTab(data) {
  return fetch("/nb-pc/1.0.1/NewsInfoService/listNewsTab", {
    method: "post",
    data: data,
  });
}
// 详情
export function detailNewsInfo(data) {
  return fetch("/nb-pc/1.0.1/NewsInfoService/detailNewsInfo", {
    method: "post",
    data: data,
    headers:{
      "Content-Type":"application/json; charset=utf-8"
    },
    withLoading: true,
  });
}
// 新增
export function addNewsInfo(data) {
  return fetch("/nb-pc/1.0.1/NewsInfoService/addNewsInfo", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 修改
export function updateNewsInfo(data) {
  return fetch("/nb-pc/1.0.1/NewsInfoService/updateNewsInfo", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 发布
export function publishNewsInfo(data) {
  return fetch("/nb-pc/1.0.1/NewsInfoService/publishNewsInfo", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 取消发布
export function unpublishNewsInfo(data) {
  return fetch("/nb-pc/1.0.1/NewsInfoService/unpublishNewsInfo", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 推荐
export function recommendNewsInfo(data) {
  return fetch("/nb-pc/1.0.1/NewsInfoService/recommendNewsInfo", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 取消推荐
export function unrecommendNewsInfo(data) {
  return fetch("/nb-pc/1.0.1/NewsInfoService/unrecommendNewsInfo", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 删除
export function deleteNewsInfo(data) {
  return fetch("/nb-pc/1.0.1/NewsInfoService/deleteNewsInfo", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
